import request from '@/utils/request'

// 查询考试列表
export function listScore_ex_exam(query) {
    return request({
        url: '/score/score_ex_exam/list',
        method: 'get',
        params: query
    })
}
export function listScore_ex_exam_today() {
    return request({
        url: '/score/score_ex_exam/show/today-list',
        method: 'get'
    })
}

// 查询考试详细
export function getScore_ex_exam(id) {
    return request({
        url: '/score/score_ex_exam/' + id,
        method: 'get'
    })
}

//根据id获取考试今日的详情
export function get_exam_today_data_by_id(id){
    return request({
        url: '/score/score_ex_exam/show/get-exam-today-data/' + id,
        method: 'get'
    })
}

// 查询考试排站详细
export function getScore_ex_exam_allot(id) {
    return request({
        url: '/score/score_ex_exam/allot/' + id,
        method: 'get'
    })
}

// 新增考试
export function addScore_ex_exam(data) {
    return request({
        url: '/score/score_ex_exam',
        method: 'post',
        data: data
    })
}

// 修改考试
export function updateScore_ex_exam(data) {
    return request({
        url: '/score/score_ex_exam',
        method: 'put',
        data: data
    })
}

// 删除考试
export function delScore_ex_exam(id) {
    return request({
        url: '/score/score_ex_exam/' + id,
        method: 'delete'
    })
}


// 排站
export function allot_exam(id) {
    return request({
        url: '/score/score_ex_exam/allot/'+id,
        method: 'post'
    })
}

// 清除排站数据
export function clear_allot_exam(id) {
    return request({
        url: '/score/score_ex_exam/clear_allot/'+id,
        method: 'post'
    })
}


// 安排学员
export function plan_student(id) {
    return request({
        url: '/score/score_ex_exam/plan_student/'+id,
        method: 'post'
    })
}

// 清除学员安排
export function clear_plan_student(id) {
    return request({
        url: '/score/score_ex_exam/clear_plan_student/'+id,
        method: 'post'
    })
}
